/*
 * Variable.h
 *
 *  Created on: 2 июн. 2022 г.
 *      Author: nikita
 */

#ifndef SRC_MATH_STUFF_MVARIABLE_H_
#define SRC_MATH_STUFF_MVARIABLE_H_

#include "../Technical/RuntimeErrorClass.h"
#include "../STL_includes.h"
#include "../Enums.h"

namespace STC_calc {

/*
* The MVariable class define specific
* parameters for every variable that may
* be use in the program.
*
* Every variable in program should has a
* diapason of values and number of steps
* for cycle counting. Because this is a
* graphical calculator and there are not
* an universal algorithm allows to solve
* every equation.
*/
class MVariable
{
private:
	std::pair<long double, long double> range;
	long double number_of_steps;
	long double curr_step;

	std::string variable_name;
public:
	MVariable(const std::string& name, const long double min, const long double max, const long double steps = 1000);
	MVariable(const MVariable&& a);
	~MVariable();
	void operator =(const MVariable& A);

	long double operator()();
	std::string name();
	long double get_value(const int step);
};

} /* namespace STC_calc */

#endif /* SRC_MATH_STUFF_MVARIABLE_H_ */
